/**
 * Copyright 2015 Qiyi Inc. All rights reserved.
 *
 * @file:   Program.js
 * @path:   js-src/album/
 * @author: karkarrotxu@qiyi.com
 * @date:   2016-03-01
 */
qui(
    function (require, exports, module) {
        Broadcast.Task = $.extend({}, EpgWeb.Task, {
            getPlayPlatform: function (taskName, callback) {
                var self = this;
                return self.getConfigType(taskName, callback)
            },
            getPlatSettings: function (regName, channelId) {
                return {
                    regName: regName,
                    options: {
                        url: EpgWeb.urlConfig.platSettingsGetUrl,
                        type: "post",
                        data: {channelId: channelId},
                        dataType: "json"
                    }
                }
            },
            getChannel: function (regName, channelId) {
                return {
                    regName: regName,
                    options: {
                        type: "post",
                        url: EpgWeb.urlConfig.channelGet,
                        dataType: "json",
                        data: {id: channelId}
                    }
                }
            },
            getBroadcastTask: function (regName, channelId) {
                return {
                    regName: regName,
                    options: {
                        url: EpgWeb.urlConfig.getBroadcastControls,
                        type: "get",
                        dataType: "json",
                        data: {channelId: channelId}
                    }
                }
            },
            getProgramBroadcastTask: function (regName, programId) {
                return {
                    regName: regName,
                    options: {
                        url: EpgWeb.urlConfig.programBroadcastControlUrl,
                        type: "get",
                        dataType: "json",
                        data: {programId: programId}
                    }
                }
            }
        })
    }
);